Fixed minor bugs in PyFry.py, Added basic gui made with tkinter#15
Fixed minor bugs in PyFry.py, Added basic gui made with tkinter#15gnany07 wants to merge 3 commits intocodezoned:masterfrom
Conversation
Fixed
Added a basic gui using tkinter in python,made relevant changes to hit proper functions
removed debug print statements
| #Finding the center point of the eye using the average outer extremes average of the eyes | ||
| mid = (eye[0] +eye[3])/2 | ||
| # Finding the center point of the eye using the average outer extremes average of the eyes | ||
| mid = (eye[0] + eye[3])/2 |
There was a problem hiding this comment.
Don't make aesthetic changes to the working code. It creates more diffs and takes extra time to review.
There was a problem hiding this comment.
hi ionicc, Actually While adding my changes somewhere I got indentation error.
I tried to fix it but couldn't, then copy-pasted whole content in sublime-text and fixed indentation and put that back.
So,these kind of changes came in. 😃 😄
I didn't check that much while commiting.
Will take care of these changes and raise a new PR.
| img = img.resize((int(w ** .90), int(h ** .90)), resample = Image.BILINEAR) | ||
| img = img.resize((int(w ** .90), int(h ** .90)), resample = Image.BICUBIC) | ||
| img = img.resize((w,h), resample = Image.BICUBIC) | ||
| img = img.resize((int(w ** .90), int(h ** .90)), resample=Image.BILINEAR) |
There was a problem hiding this comment.
I can see you have made a lot of spaces and changes to already working code, Not that it does any harm. I would suggest not to touch the working part of code unless raised in open source projects 😄
| flare = Image.open('flare.png') | ||
| detect = dlib.get_frontal_face_detector() | ||
| predict = dlib.shape_predictor("assets\shape_predictor_68_face_landmarks.dat") | ||
| face_landmarks_file = "assets/shape_predictor_68_face_landmarks.dat" |
There was a problem hiding this comment.
Maybe you can add a dynamic addition of the face_landmarks_file from the GUI, That'll be clean 👍
ionicc
left a comment
There was a problem hiding this comment.
I've left some comments and please add a screenshot of the GUI as a comment in the PR.
|
My bad, I hadn't noticed the Screenshot already given. Looks clean 😄. How bout adding a file picker as mentioned above for face_landmarks_file. |
Fixed
If we give different image other than test.jpg, the flares are not drawn properly #14
Unable to open assets\shape_predictor_68_face_landmarks.dat #13
Description
For addressing issue 13, I have made sure we give absolute path instead of relative path.
This is should make sure we don't get any runtime errors of opening .dat file.
For addressing issue 14, We have hardcoded the image 'test.jpg' in the addFlare function
for any input image. I have stored img in 'temp.jpg' in the main and used 'temp.jpg'
in addFlare function.
I have tested all three images (test1,test2,meme1) all three gives expected output.
Fixes # (issue)
13 and 14
Type of change
This is my first PR ,feel free to give comments and correct me.